package com.hit.aircraftwar.setter;

public class TimeController implements Runnable {

    private final int locationX;
    private final int locationY;
    private final int time;

    public TimeController(int time, int locationX, int locationY) {
        this.time = time;
        this.locationY = locationY;
        this.locationX = locationX;
    }

    public int getLocationX() {
        return locationX;
    }

    public int getLocationY() {
        return locationY;
    }

    @Override
    public void run() {
        synchronized (this) {
            try {
                wait(time);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
